package com.yanmaohu.yulia.bean;

/**
 * @author Bright Lee
 */
public final class CollectionDerivedTableTablePrimary implements TablePrimary {

    private int beginIndex;
    private int endIndex;
    private CollectionValueExpression collectionValueExpression;
    private boolean withOrdinality;
    private Identifier correlationName;
    private IdentifierChain derivedColumnList;


    public CollectionDerivedTableTablePrimary(int beginIndex,
                                              int endIndex,
                                              CollectionValueExpression collectionValueExpression,
                                              boolean withOrdinality,
                                              Identifier correlationName,
                                              IdentifierChain derivedColumnList) {
        this.beginIndex = beginIndex;
        this.endIndex = endIndex;
        this.collectionValueExpression = collectionValueExpression;
        this.withOrdinality = withOrdinality;
        this.correlationName = correlationName;
        this.derivedColumnList = derivedColumnList;
    }

    @Override
    public int getBeginIndex() {
        return beginIndex;
    }

    @Override
    public int getEndIndex() {
        return endIndex;
    }

    public CollectionValueExpression getCollectionValueExpression() {
        return collectionValueExpression;
    }

    public boolean isWithOrdinality() {
        return withOrdinality;
    }

    public Identifier getCorrelationName() {
        return correlationName;
    }

    public IdentifierChain getDerivedColumnList() {
        return derivedColumnList;
    }

}
